// pages/market/market.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    market1:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLs0fuEyauHODiHPZivflW31mf8vTn0ZI6emL2iuGjgagzDRWXJoiZqLoCAVFfFbOQQ!!/mnull&bo=4QI2AQAAAAADB*Y!&rf=photolist&t=5",
    market2:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLjqXDCcXwwdjT71VpCVFzxg0I*BZRSYOiJ3DjjeiJVeq6xH8DLQWjrvy.myUFJs60Q!!/b&bo=qAIYAQAAAAARB4M!&rf=viewer_4",
    market3:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLt*hJEAvdXdOZosHTq2NuqQ247h*yB0J.omUFF*.pKYascxG9xosA38w*G.q4ccz*A!!/b&bo=MwIsAQAAAAARByw!&rf=viewer_4",
    sidamingzhu:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLpq.i*BvDacYeV3msjj16axCwhmmGmTELhVginSVoDFzHx9gcgpd5AMNxRBWqdPtQQ!!/b&bo=PAMMAwAAAAADBxI!&rf=viewer_4",
    sidamingzhud:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLhP2uWwkzIUo*LUsBccGqiERtwhURxhId5T7fdkQ3dklkUCuLc516zXco9e5e87rnw!!/b&bo=7gKBFAAAAAARB0k!&rf=viewer_4",
    whiwangewhy:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLvTR1MGm3lUNho9ix4zbcmqlG8NEfLiCvNtEyVebUUjn1nX7*HVLSIuWiEW3BbaAWg!!/b&bo=RQPmAgAAAAADB4A!&rf=viewer_4",
    whiwangewhyd:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLrcUV7vah269H7vi7BShgu1qocHhLB0a4Yz6mrbT6OPoSWEYRSM*xxaXzjCkshWvsw!!/b&bo=BALHJQAAAAADB8Y!&rf=viewer_4",
    diyshougong:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLs8QRB9mXeQundy.*47MpOltGbmi8IHlhMBsOcDTmXfFHNzqWij1mFsqxTfN.cO9lg!!/b&bo=UgIiAgAAAAADB1I!&rf=viewer_4",
    diyshougongd: "http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLiY.J97lc5SHJKdaDXr6irR9I7dbT.mRwETQMpKE0P.zZr49BLIhvhlxv7R4jWp8pA!!/b&bo=FQIfJgAAAAADBww!&rf=viewer_4",
    zhuanzhuli:"http://m.qpic.cn/psc?/V13kpbE73UDL85/Ub*4aHxmnNgAqL6c0lJ4K5*8C.yErkbQPsbFX4m3JsaMjNeBNKvD0GNMELrtDU0*s5loV3Bl.WRFHuAfJK0enetj*f.kMCnLwSsEy7OfiuY!/b&bo=EgIAAgAAAAADNwA!&rf=viewer_4",
    zhuanzhulid:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLt5s5cmY.U7HPVBeAWauyszkz78HeM5S4pYjg27FODFf.6g0yHcgLMFgJ6g0i.ac5g!!/b&bo=.AK0JQAAAAADB0k!&rf=viewer_4",
    ns:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLnOrErTJzQ5NA2ZJUxP0zLCAxDU4jJq8DZys8dxajBM8PVtwsZBy0zt9N4VqsXYoQA!!/b&bo=GQORAgAAAAADB6s!&rf=viewer_4",
    nsd:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLt81FTPv..ji.Sujuc82lbSOV6Z8sCTebmx1YoNHAesY1vhgyDRZgQssMroxzKEYog!!/b&bo=JQIdJgAAAAADBz4!&rf=viewer_4",
    ps4:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLp1ut72vOcnWym9rvOWIHO2OpFf8k1h6ZEwKvNUkzw6uIAHwvcZoDrbJKST38U04.A!!/b&bo=*wJrAgAAAAADB7Y!&rf=viewer_4",
    ps4d:"http://m.qpic.cn/psc?/V13kpbE73UDL85/u0qUMsilGdkhXscKj.lHLjS.nKxZFOKqBXDM4LpOTGRqJcT1rXRCmwHnVcLNjRfy2EYsXjqEpKDIAPTrX8Z4Gw!!/b&bo=RQLqJQAAAAADB6o!&rf=viewer_4"
  },
  

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  onGotoGoodsDetails(event) {
    //console.log(event)
    const dataset = event.detail;
    const details = dataset.details;
    const price = dataset.price;
    const src = dataset.src;
    const srcd = dataset.srcd;
    const score = dataset.score;
    var newObject = JSON.stringify(src);
    var encodeObject = encodeURIComponent(newObject);
    var newObjectd = JSON.stringify(srcd);
    var encodeObjectd = encodeURIComponent(newObjectd);
    //console.log(dataset)
    wx.navigateTo({
      url: '/pages/goods-details/goods-details?details=' + JSON.stringify(details) 
      + '&price=' + JSON.stringify(price) 
      + '&score=' + JSON.stringify(score) 
      + '&src=' + encodeObject
      + '&srcd=' + encodeObjectd
    })
  },
})